package com.wondertek.common.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;

/**
 * @author: gongjiangtao
 * @date: 2024/8/1 09:40
 * @Description: 账号状态枚举
 * @Version: 1.0
 */
public enum StatusEnum {

    ENABLE("ENABLE", "启用"),
    DISABLE("DISABLE", "禁用");

    /**
     * 在需要保存到数据库的值上面加上注解
     * @JsonValue需要在前端展示哪个值就在哪个属性上加上该注解
     */
    @EnumValue
    private final String code;

    private final String desc;

    StatusEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
